home *** CD-ROM | disk | FTP | other *** search
- package asp.wizard.def;
-
- import java.util.Enumeration;
-
- public class DefPage extends DefCollection {
- public static final int INVALID_ASSET_ID = -1;
- private DefCollection _childPages = new DefCollection();
- private int _assetId = -1;
-
- public void addChildPage(DefPage childPage) {
- this._childPages.addElement(childPage);
- ((DefAbstract)childPage).setParent(this);
- }
-
- public void removeChildPage(DefPage childPage) {
- this._childPages.removeElement(childPage);
- }
-
- public DefCollection getChildPages() {
- return this._childPages;
- }
-
- public void removeAll() {
- ((DefCollection)this).removeAllElements();
- this._childPages.removeAllElements();
- }
-
- public int getDescendantCount() {
- int result = 0;
- DefPage aChildPage = null;
-
- for(Enumeration e = this.getChildPages().getElements(); e.hasMoreElements(); ++result) {
- aChildPage = (DefPage)e.nextElement();
- result += aChildPage.getDescendantCount();
- }
-
- return result;
- }
-
- public String getBaseName() {
- return "Page";
- }
-
- public int getAssetId() {
- return this._assetId;
- }
-
- public void setAssetId(int id) {
- this._assetId = id;
- }
- }
-